<!--
	作者：956911785@qq.com
	时间：2018-10-18
	描述：账号或密码修改-添加
-->

<template>
	<Modal title="模块名称修改" v-model="modal0" width="700px">
		<Form ref="params" :label-width="100" label-position="left">
			<div style="width:100%; overflow-y: hidden;height:180px;">
	        	<div style="width:100%;float:left; ">
		        	<div style="width: 50%;text-align: left;float: left;height: 60px;line-height: 60px;" align="left">
				        <FormItem  prop="whkbmqk0" label="原模块名">
				        	<Input v-model="params.whkbmqk0" style="width: 70%" readonly="readonly"></Input>
		        		</FormItem>
		        	</div>
		        	<div style="width: 50%;text-align: left;float: left;height: 60px;line-height: 60px;" align="left">
				        <FormItem  prop="whkbmqk" label="新模块名">
				        	<Input v-model="hparam.whkbmqk" placeholder="请输入新的模块名称！" clearable style="width: 70%"></Input>
		        		</FormItem>
		        	</div>
	        	</div>

	        	<div style="width:100%;float:left; ">
		        	<div style="width: 50%;text-align: left;float: left;height: 60px;line-height: 60px;" align="left">
				        <FormItem  prop="sthdbmqk0" label="原模块名">
				        	<Input v-model="params.sthdbmqk0"  style="width: 70%" readonly="readonly"></Input>
		        		</FormItem>
		        	</div>
		        	<div style="width: 50%;text-align: left;float: left;height: 60px;line-height: 60px;" align="left">
				        <FormItem  prop="sthdbmqk" label="新模块名">
				        	<Input v-model="hparam.sthdbmqk" placeholder="请输入新的模块名称！" clearable style="width: 70%"></Input>
		        		</FormItem>
		        	</div>
	        	</div>
	        	
		   </div> 
		  
	    </Form>
	   	<div slot="footer">
	    	<Button type="text"  @click="closeModal()">取消</Button>
	    	<Button type="primary" @click="updateUaccount()" >确定</Button>
	    </div>
     </Modal>
</template>

<script>
	export default {
		name:"headedit",
		props: {
    		params:{
    			type:Object,	
    			default: function() {
					return null
				}
    		},
    	},
		data() {
			return {
				hparam:{
					whkbmqk:'', 
					sthdbmqk:'', 
				},
				modal0:false,
			}
		},
		components: {
		},
		methods: {
			closeModal(){
				this.modal0= false;
			},
			updateUaccount(){
				var params={
					csid:this.params.csid,
					whkbmqk:this.hparam.whkbmqk, 
					sthdbmqk:this.hparam.sthdbmqk, 
				}
				this.$refs.params.validate((valid) => {
					if (valid){
						//保存
						this.$http.post("/host/stgl/updateSystemName.html",params)
						.then(result => {
							//添加成功 刷新页面
							if(result){
								this.$Modal.success({
		                            title: "成功",
		                            content: "修改成功！",
		                            onOk: () => {
		                            	this.modal0= false;
		                            	this.$emit("setSystemInfo");
		                            }
		                       });
							}else{
								this.$Modal.error({
		                            title: "失败",
		                            content: "修改失败！"
		                        });	
							}
						});
                    }
               })
			}
		},
		computed: {
		
		},
		mounted() {	
		},
		watch:{	
		},
	}
</script>

<style scoped="scoped">
	
</style>



